<%@ taglib prefix="s" uri="/struts-tags"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="basestyle.css">
</head>

<body id="layout">
	<div id="bodyheader">Create/Edit Employee</div>
	<br></br>
	<div id="bodystyle"><s:actionerror /> 
	<s:form action="createEmployee" method="post">
		<s:textfield name="userId" label="User ID" readonly="true"/>
		<s:textfield name="empId" label="Employee ID" readonly="true"/>
		<s:textfield name="empName" label="Employee Name"/>
		<s:textfield name="username" label="Username (LoginID)"/>
		<s:textfield name="pswd" label="Login Password" />

		<s:select label="Department" name="deptId" list="departments"
			listKey="deptId" listValue="deptName" required="true"
			value="deptId" />
		<s:select label="Role" name="role" list="roles" listKey="roleName"
			listValue="roleName" required="true" value="roleName" />

		<s:textfield name="salary" label="Salary per Month" />
		
		<s:if test="actionName=='editEmployee'">
			<s:submit name="actionName" value="Edit Employee"></s:submit>
		</s:if>
		<s:if test="actionName=='createEmployee'">
			<s:submit name="actionName" value="Create Employee"></s:submit>
		</s:if>
	
	</s:form>
	</div>

</body>
</html>